//
// Created by ins on 2021/2/27.
//

#ifndef SERVICE_PLAYERDAO_H
#define SERVICE_PLAYERDAO_H


#include <PlayerBean.h>
#include <iostream>
#include <string>
#include <list>

using std::string;
class PlayerDao {
private:
    PlayerDao();
    ~PlayerDao();
    static PlayerDao *sInstance;

public:
    static PlayerDao* getInstance();
    void addPlayer(PlayerBean playerBean);
    void delPlayer(PlayerBean playerBean);
    void updatePlayer(PlayerBean playerBean);
    void getPlayer(string sid, PlayerBean& retPlayer);
    bool changeExp(string sid, string exp);
    bool updatePlayerEndTime(string sid);
    bool updatePlayerSX(string sid, string mibName, string mibValue);
    void getAllPlayer(string nowmid, list<PlayerBean> &allplayers);
};


#endif //SERVICE_PLAYERDAO_H
